<?php
//连接数据库
require_once('conn.php');
class Register{
    private $nenufish_register_name;    //用户姓名
    private $nenufish_register_skill;   //提供技能类型
    private $nenufish_register_psw;     //用户密码
    private $nenufish_register_pic;     //用户头像
    private $nenufish_register_state;   //用户是否愿意提供帮助
    private $nenufish_register_id;      //用户ID

    //在user中插入用户信息
    public function insertUser($nenufish_register_name,$nenufish_register_pic,$nenufish_register_psw){
        $sql = "INSERT 
                INTO db_nenufish_user(nenufish_user_name,nenufish_user_pic,nenufish_user_psw) 
                VALUE ('".$nenufish_register_name."','".$nenufish_register_pic."',".$nenufish_register_psw.")";
        $query = mysqli_query($GLOBALS['link'],$sql) ;
        return $query;
    }

    //在skillOffer表中插入信息
    public function insertSkillOffer($nenufish_register_id,$nenufish_register_skill,$nenufish_register_editorState){
        $sql = "INSERT
                INTO db_nenufish.db_nenufish_skilloffer(nenufish_skillOffer_editor,nenufish_skillOffer_type,nenufish_skillOffer_editorState)
                VALUE (".$nenufish_register_id.",'".$nenufish_register_skill."','".$nenufish_register_editorState."')";
        $query = mysqli_query($GLOBALS['link'],$sql) ;
        return $query;
    }
}
?>